<!DOCTYPE html>
<html lang="en">

<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<meta name="viewport"
		content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
	<meta name="format-detection" content="telephone=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<link rel="stylesheet" href="css/reset.css">
	<link rel="stylesheet" href="css/index.css">
	<title>福利币充值</title>
	<script type="text/javascript" src="js/flexible.js"></script>
</head>

<body>
	<div class="content mflbcz flex-column pt80" id="app">
		<!-- header -->
		<header class="dheader flex-align flex-between">
			<a href="javascript:history.back(-1);" class="dheader-back iconfont iconleft c333"></a>
			<div class="dheader-title tc c333">
				<span>福利币充值</span>
				<span class="iconfont iconwenhao2 ml10" @click="showAnimation('.jkzk-box,.pop')"></span>
			</div>
		</header>
		<!--  -->
		<div class="cz-box flex1 flex-column">
			<div class="mflbcz-main flex1">
				<!-- 未选游戏 -->
				<div class="choseGameBtn" v-if="!showFlag" @click="selectGame">
					<img src="./images/my/chongzhi/game.png" alt="">
					<span>选择充值项目</span>
				</div>
				<!-- 已选游戏 -->
				<div class="c_main_case" v-if="showFlag">
					<span class="c_main_cz">当前充值游戏</span>
					<image class="c_gimg" :src="zr.pic1" mode=""></image>
					<div class="c_h">
						<div class="c_h1">
							<span>{{zr.gamename}}</span>
							<span class="c_h1_2 fz20" v-if="zr.subtitle">{{zr.subtitle}}</span>
						</div>
						<div class="c_h2">
							<div class="c_h2_2" :class="{c_h2_1: zr.is_firstpay==1}">
								首充{{zr.super_discount_show!=0? zr.super_discount_show: zr.firstpay}}折</div>
							<div class="c_h2_2" :class="{c_h2_1: zr.is_firstpay==0}">续充{{zr.otherpay}}折</div>
							<div class="c_h2_3" v-if="zr.is_reassure_play==1">
								<image src="./images/my/chongzhi/dun.png" mode=""></image>安心玩
							</div>
						</div>
					</div>
					<div class="c_s" @click="selectGame" v-if="!changeGameFlag">更换</div>
				</div>
				<!-- 内容 -->
				<div class="main-con ">
					<div class="g_cz">
						<div class="g_h">
							<span>请选择充值金额</span>
							<span class="fz24 ca1a ml12">(1元=1福利币）</span>
						</div>

						<div class="g_tap flex flex-wrap flex-between">
							<div class="t flex-column flex-center-align"
								:class="{tap_act:flagTap==index,tsc:(item.discount!=0 || further_reductions==1 && showFlag)}"
								v-for="(item,index) in list" :key="index" @click="tap(item,index)">
								<!-- 现价 -->
								<div class="t2 tc bold flex-center-align">
									<image class="t-img" src="./images/my/chongzhi/icon4.png" mode="">
									</image>
									<span class="fz36 c000">{{item.djq}}</span>
								</div>
								<!-- 原价 -->
								<div class="t1-1 fz20" v-if="showFlag && line_through==1">￥{{item.djq}}</div>
								<!-- 福利币 -->
								<div class="fz30 c000 tc" style="line-height: 1;">
									<span>￥{{item.new_money==0?item.money: item.new_money}}</span>
								</div>
								{{item.discount}}
								<!-- 标识 -->
								<div class="t4" v-if="item.discount!=0">超级补贴</div>
								<div class="t3" v-else-if="further_reductions==1 && showFlag">折上折</div>
							</div>
						</div>
						<!--  -->
						<div class="g-sr flex-align">
							<input class="flex1" type="number" placeholder-style="font-size: 24rpx" @input="inputNum"
								v-model="flbNumIpt" placeholder="请输入充值福利币数量(整数)" @focus="handleFocus" @blur="handleBlur"
								oninput="if(value.length>6)value=value.slice(0,6)" />
						</div>
					</div>
					<!-- 优惠券 -->
					<div class="yhq-t fz30 c000 mt40">
						<span>优惠券</span>
					</div>
					<div class="c_quan flex-align" :class="flagnum==0?'no':''" @click="openQuan" v-if="couponFlag">
						<span class="fz28" v-if="!couponObj.id">选择优惠券</span>
						<div class="ccoup" v-if="couponObj.id">
							<!-- 折扣券 -->
							<span v-if="couponObj.money_type==1">
								<span>{{accMultiply(couponObj.coupon_money,10)}}折</span>
								<span v-if="couponObj.pay_money==0">（无门槛）</span>
								<span v-else>（满{{couponObj.pay_money}}）</span>
							</span>
							<!-- 优惠券 -->
							<span v-else>
								<span v-if="couponObj.pay_money==0">立减{{couponObj.coupon_money}}（无门槛）</span>
								<span v-else>满{{couponObj.pay_money}}减{{couponObj.coupon_money}}</span>
							</span>
							<!--  -->
						</div>
						<div class="c_quan1">
							<span class="c_quan1-a">{{flagnum}}张</span>
							<span class="iconfont iconright"></span>
						</div>
					</div>

					<div class="discountDetail">
						<div class="list" v-if="couponObj.money_type==1">
							<div class="title">折扣券减免</div>
							<div class="val">{{accMultiply(flbNum,accSub(1,couponObj.coupon_money))}}</div>
						</div>
						<div class="list" v-else>
							<div class="title">优惠券减免</div>
							<div class="val">{{couponObj.coupon_money}}</div>
						</div>
						<div class="list" v-if="zr.id">
							<div class="title">游戏折扣</div>
							<div class="val">{{zr.discount}}</div>
						</div>
						<div class="list" v-if="zr.id&& discountSpecial!=0">
							<div class="title">原价</div>
							<div class="val">{{orgPrice}}</div>
						</div>
						<div style="margin-left: -20rpx;" class="fz30 c000 mt40 flex" v-if="discountSpecial!=0">
							<div class="title flex1">超级补贴</div>
							<div class="val">{{discountSpecial}}</div>
						</div>
						<div class="list mt20" v-if="couponObj.money_type==1">
							<div class="title">实付金额</div>
							<div class="val">({{flbNum}} * <span class="cff4">{{couponObj.coupon_money}}</span>) =
								{{accMultiply(flbNum,couponObj.coupon_money)}}*{{finalDiscount}}
							</div>
						</div>
						<div class="list mt20" v-else>
							<div class="title">实付金额</div>
							<div class="val">({{flbNum}} - {{couponObj.coupon_money}}) * {{finalDiscount}}</div>
						</div>
						<div class="tip" v-if="discountSpecial!=0">注意：超级补贴与优惠券不能同时享受,最终结算折扣按<span>最大优惠</span>计算
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="mflfooter ">
			<div class="mflfooter-cjbt flex-align borb">
				<div class="flex1 flex-align">
					<img class="mflfooter-cta" src="./images/logo.png" alt="">
					<span class="mflfooter-ctb">通过APP充值享受</span>
					<span class="mflfooter-ctc">受超级补贴</span>
				</div>
				<img class="mflfooter-ctd show-app" src="./images/down.png" alt="">
			</div>
			<div class="mflfooter-fk flex-align">
				<div class="mflfooter1 flex1 flex-align" style="line-height: 1;">
					<span class="fz30" style="padding-top: 10rpx;">金额：￥</span>
					<div class="ovn">
						<span class="fz44">{{num}}</span>
						<span class="fz24 line c999 ml10" v-if="flagTap!=8">{{flbNum}}</span>
					</div>
				</div>
				<div class="mflfooter2 flex-center-align" @click="toCz">充值</div>
			</div>

		</div>
		<!-- 省钱卡购买须知 -->
		<div class="pop"></div>
		<div class="tier-pop jkzk-box">
			<div class="jkzk-title flex-center-align"><span>省钱卡购买须知</span></div>
			<div class="jkzk-p flex-column">
				<span>1、购买后可立即领取6个福利币，后续每日可领取一次。</span>
				<span>2、每日领取的福利币仅当天有效。</span>
				<span>3、重复购买或续费省钱卡时间将延长。</span>
				<span>4、省钱卡福利币使用后不支持退还。</span>
				<span>5、未成年及未实名用户不可购买。</span>
				<span>6、省钱卡属虚拟产品，开通后不支持退款。</span>
			</div>
			<div class="jkzk-b flex-center-align" @click="isShow=false">
				<span>我知道了</span>
			</div>
		</div>
		<!-- 支付弹窗 -->
		<div class="tier-popup pay-bpop">
			<div class="pay-bpop-name">需要支付</div>
			<div class="pay-bpop-close iconfont iconguanbi"></div>
			<div class="pay-bpop-num flex">
				<span class="fz32">￥</span>
				<span class="fz52 ">{{num}}</span>
			</div>
			<div class="pay-bpop-tb flex-align flex-between">
				<span>充值道具</span>
				<span>省钱卡</span>
			</div>
			<div>
				<div class="pay-bpop-li flex-align mt50" :class="payType=='zfb'?'on':''" @click="payType='zfb'">
					<span class="pay-bpop-la iconfont iconalipay" style="color:#1677FF"></span>
					<span class="pay-bpop-lb">支付宝</span>
					<span class="pay-bpop-lc iconfont iconchoice0"></span>
				</div>
				<div class="pay-bpop-li flex-align" :class="payType=='wx'?'on':''" @click="payType='wx'">
					<span class="pay-bpop-la iconfont iconweixinzhifu" style="color:#00C800"></span>
					<span class="pay-bpop-lb">微信</span>
					<span class="pay-bpop-lc iconfont iconchoice0"></span>
				</div>
			</div>
			<div class="pay-bpop-f flex-center-align" @click="payFun"><span>去支付</span></div>
		</div>
		<!-- 选择游戏 -->
		<div class="tier-popup gasme-pselect">
			<div class="gasme-s_game">
				<div class="gasme-close iconfont iconguanbi"></div>
				<div class="gasme-s_game_h">选择游戏</div>
				<input type="text" @input="debouncedHandleInput" v-model="gname" placeholder="搜索游戏名字" />
				<div class="gasme-s_games" @scroll="handleScroll($event,1)">
					<div class="gasme-game" v-for="(i,index) in gList" :key="index" @click="selectOkGame(i)">
						<div class="gasme-c_gimg"><img class="img100" :src="i.pic1"></img></div>
						<div class="gasme-c_h">
							<div class="gasme-c_h1">{{i.gamename}}
								<div class="gasme-gggg" v-if="i.subtitle">
									<text>{{i.subtitle}}</text>
								</div>
							</div>
							<div class="gasme-c_h2"></div>
						</div>
					</div>
					<!--  -->
					<div class="loadmore flex-center-align">
						<span class="loadmore-span" v-if="selectStatus=='more'">上拉显示更多</span>
						<div class="flex-align" v-if="selectStatus=='loading'">
							<span class="loader-android"></span>
							<span class="loadmore-span">正在加载...</span>
						</div>
						<span class="loadmore-text" v-if="selectStatus=='noMore'">全部加载</span>
						<div class="loadmore-noData" v-if="selectStatus=='noData'">
							<span class="loadmore-notxt">暂无数据</span>
						</div>
					</div>
					<!--  -->
				</div>
			</div>
			<!--  -->
		</div>
		<!-- 选择优惠券 -->
		<div class="tier-popup gcoupon-pselect">
			<div class="gcoupon-s_game">
				<div class="gcoupon-s_game_h">选择优惠</div>
				<div class="gcoupon-s_games" @scroll="handleScroll($event,2)">
					<!-- flagS==g?'border':'' -->
					<div class="gcoupon-case" :class="{'caseAct':g.type==0, 'border': couponFlagS==g}"
						v-for="(g,index) in couponList" :key="index" @click="couponCelect(g)">
						<div class="gcoupon-case1">
							<div class="gcoupon-case1_1">
								<!-- 折扣券 -->
								<text v-if="g.money_type==1">{{accMultiply(g.coupon_money,10)}}折</text>
								<!-- 优惠券 -->
								<text v-else>{{g.coupon_money}}</text>
							</div>
							<div class="gcoupon-case1_2" v-if="g.pay_money==0">无门槛</div>
							<div class="gcoupon-case1_2" v-else>满{{g.pay_money}}可用 </div>
						</div>
						<div class="gcoupon-case2">
							<div class="gcoupon-case2_1">{{g.gamename}} </div>
							<div class="gcoupon-case2_2">{{g.name}} </div>
							<div class="gcoupon-case2_3">有效期至：{{g.time}} </div>
						</div>
					</div>
				</div>
				<div class="gcoupon-btn">确定</div>
			</div>
			<!--  -->
		</div>
	</div>
	<!--  -->
	<script src="js/jquery.min.js"></script>
	<script src="js/vue-2.7.16.js"></script>
	<script src="js/used.js"></script>
	<script>
		//关闭选择游戏
		$(document).on('click', '.gasme-close', function () {
			hideAnimation('.gasme-pselect,.pop');
		})
		//关闭选择优惠券
		$(document).on('click', '.gcoupon-btn', function () {
			hideAnimation('.gcoupon-pselect,.pop');
		})
		//
		new Vue({
			el: '#app',
			data() {
				return {
					payType: '',//支付方式
					line_through: null, //1：显示中间的线
					further_reductions: null,
					finalDiscount: 0,
					couponFlag: true, // 超级补贴与优惠券不能同时使用标识
					isFocused: false,//输入框是否获取焦点
					showFlag: false, // 充值项Flag
					gid: '', // 游戏id
					flagTap: 8,
					zr: {
						gamename: '选择游戏',
						id: '',
						discount: 1,
					},
					list: [{
						is_coupon: 0,
						money: '---',
						djq: 100,
						discount: 0
					},
					{
						is_coupon: 1,
						money: '---',
						djq: 500,
						discount: 0
					},
					{
						is_coupon: 1,
						money: '---',
						djq: 1000,
						discount: 0
					},
					{
						is_coupon: 1,
						money: '---',
						djq: 2000,
						discount: 0
					},
					{
						is_coupon: 1,
						money: '---',
						djq: 5000,
						discount: 0
					},
					{
						is_coupon: 1,
						money: '---',
						djq: 10000,
						discount: 0
					}
					],
					num: '', // 最终计算后的充值金额
					discount: 1, // 当前项当前用户所属折扣
					discountSpecial: 0, // 后台设置的特殊折扣 
					orgPrice: 0, // 原价
					flbNum: 0, // 福利币
					flbNumIpt: null,//福利币输入框
					changeGameFlag: true,
					saveid: null,
					userinfo: {},
					//选择游戏弹窗
					gname: '',
					gList: [],//选择游戏列表
					selectPage: 1,//选择游戏 页码
					selectStatus: 'more',
					//选择优惠券弹窗
					flagnum: 0,//优惠券数量
					couponPage: 1,
					couponStatus: 'more',
					couponList: [],
					couponObj: {
						id: '',
						coupon_money: 0,//优惠券额度
					},
				}
			},
			created() {
				this.gid = getQueryString('id') || ''; //游戏id、有id是从充值页面进入的、
				//是否可重新选择游戏
				this.changeGameFlag = this.gid ? true : false;
				this.init()
			},
			methods: {
				//真支付啊
				payFun() {
					// this.$refs.cz.open(this.num, this.zr.id, this.couponObj.id, this.couponObj.coupon_money, this.flbNum, this.orgPrice)
				},
				//输入框获取焦点
				handleFocus() {
					this.isFocused = true;
				},
				//输入框 失去焦点
				handleBlur() {
					this.isFocused = false;
				},
				// 计算实际支付
				actualPay() {
					console.log('开始计算------------------------');
					if (!this.zr.id) return

					let finalDiscount = this.discountSpecial == 0 ? this.discount : this.discountSpecial; // 最终折扣
					this.finalDiscount = finalDiscount;
					// 原价
					this.orgPrice = (this.flbNum * this.discount).toFixed(2)
					let actualNum = 0;
					console.log(this.couponObj)
					let coupon_money = this.couponObj.coupon_money || 0;//优惠券额度
					// 折扣券
					if (this.couponObj.money_type == 1) {
						actualNum = this.flbNum * coupon_money * finalDiscount;
					} else {
						//满减券
						actualNum = (this.flbNum - coupon_money) * finalDiscount;
					}
					if (actualNum < 0) actualNum = 0; // 向阳要改的
					console.log('实际支付:', actualNum);
					this.num = actualNum.toFixed(2)
				},
				//重新获取优惠券
				getCoupon(type) {
					// console.log('111--------- 重置优惠券');
					this.resetCoupon()
					this.actualPay(); //重新计算
				},
				// 重置优惠券
				resetCoupon() {
					// console.log('--------- 重置优惠券');
					this.couponObj = {};
				},
				// 跳转后 查询游戏详情
				async getGameDetail(id) {
					let params = {
						game_name: '',
						page: 1,
						size: 10,
						game_id: id
					}
					console.log('---2 查询游戏详情 gid->>', this.gid, '2->>', id);
					// console.log('---2 查询游戏详情params', params);
					if (!id) return;
					let res = {
						"code": 10000,
						"msg": "成功",
						"data": {
							"list": [
								{
									"id": 1479,
									"pic1": "http://oss.sssgo.com/data/upload/game/20240906/66da863c4deb8.png",
									"gamename": "猫狩纪",
									"gametype": 9,
									"gametype1": 14,
									"gametype2": 3,
									"edition": 2,
									"apkname": "com.wan1740472218.game",
									"firstpay": "2.5",
									"otherpay": "3.0",
									"djq_ladderpay": "[{&quot;key&quot;:&quot;100&quot;,&quot;value&quot;:&quot;0.1&quot;},{&quot;key&quot;:&quot;500&quot;,&quot;value&quot;:&quot;0.2&quot;},{&quot;key&quot;:&quot;1000&quot;,&quot;value&quot;:&quot;0.22&quot;}]",
									"cps_djq_ladderpay": null,
									"gamelevel": 0,
									"pay_firstpay": 0.1,
									"pay_otherpay": 0.1,
									"is_reassure_play": 0,
									"is_hasten": 1,
									"subtitle": "0.1",
									"super_discount": 0,
									"super_discount_show": 0,
									"is_firstpay": 0,
									"discount": 0.3,
									"pay_coin": 0.1,
									"showmz": false
								}
							]
						}
					}
					// console.log('---2 查询游戏详情res', res);
					if (res.code == 10000) {
						let list = res.data.list
						if (list.length > 0) {
							let obj = res.data.list[0]
							this.zr = obj
							this.discount = obj.discount
							this.showFlag = true
							this.flagTap = 8;
							this.getCzList(obj)
						}
					}
				},
				// 检查输入金额是否属于特殊折扣档
				checkNum(num) {
					const that = this;
					const list = this.list;

					let numA = 0;

					list.forEach(item => {
						if (item.djq == num) {
							numA = item.discount
						}
					})
					that.couponFlag = numA == 0; // 超级补贴与优惠券不能同时使用标识
					that.discountSpecial = numA
				},
				checkDecimal(str) {
					const regex = /^(0|([1-9]\d*))$/;
					return regex.test(String(str));
				},
				//金额输入
				inputNum(e) {
					this.flagTap = 8;
					let val = e.target.value
					if (this.zr.id) {
						if (this.checkDecimal(val)) {
							console.log('1111');
						} else {
							toast.success('金额必须为整数')
						}
						val = e.target.value.replace(/[^\d]/g, '');
						val = val.replace(/^0+/g, '');

						if (val > 999999999) {
							toast.success('充值福利币请小于999999999')
						}
						this.flbNum = val;
						this.flbNumIpt = val;
						this.checkNum(val);
						this.resetCoupon();
						this.actualPay();
						this.getCanUseCoupon();
					} else {
						toast.success('请选择游戏')
					}
				},
				//选择游戏
				async selectGame() {
					this.gname = '';
					showAnimation('.gasme-pselect,.pop');
					this.selectPage = 1;
					this.gList = [];
					this.getGameList('new');
				},
				tap(obj, i) {
					if (this.zr.id == '') {
						toast.success("请选择游戏")
						return
					}

					this.couponFlag = obj.discount == 0; // 超级补贴与优惠券不能同时使用标识
					this.resetCoupon();
					this.flagTap = i
					this.num = obj.money; // 原计算金额  // genius
					this.flbNum = obj.djq; // 充值的福利币数量
					// 如果有特殊折扣 按特殊折扣计算
					this.discountSpecial = obj.discount != 0 ? obj.discount : 0;
					this.flbNumIpt = ''; // 置空下方input

					this.getCanUseCoupon(); // 获取可使用优惠券（数量）
					this.actualPay();
				},
				// 获取可使用优惠券（数量）
				getCanUseCoupon() {
					let params = {
						game_id: this.zr.id,
						money: this.flbNum,
						page: 1,
						size: 99,
					};
					let res = {
						"code": 10000,
						"msg": "成功",
						"data": {
							"coupon_num": 0,
							"list": []
						}
					}
					this.flagnum = res.data.coupon_num
				},
				//点击支付
				toCz() {
					console.log(this.zr, '---zr');
					console.log(this.num, '---num');
					console.log(this.flbNum, '---flbNum');
					if (this.zr.id == '') {
						toast.success('请选择游戏')
						return
					}
					if (this.num === null) {
						toast.success('请选择充值金额')
						return
					}
					if (this.flbNum == '') {
						if (this.num == 0) {
							toast.success('请选择充值金额')
							return
						}
					}
					//
					if (this.zr.id != '' && this.flbNum != '') {
						console.log('---1 跳转充值');
						showAnimation('.pay-bpop,.pop');
					}

				},
				// 获取充值金额列表
				async getCzList(obj) {
					let params = {
						game_id: obj.id,
					}
					let res = {
						"code": 1,
						"msg": "success",
						"data": {
							"discount": 0.35,
							"further_reductions": 0,
							"line_through": 1,
							"list": [
								{
									"discount": 0.1,
									"money": 35,
									"new_money": 10,
									"djq": 100,
									"is_coupon": 0
								},
								{
									"discount": 0.18,
									"money": 175,
									"new_money": 90,
									"djq": 500,
									"is_coupon": 0
								},
								{
									"discount": 0.2,
									"money": 350,
									"new_money": 200,
									"djq": 1000,
									"is_coupon": 0
								},
								{
									"discount": 0,
									"money": 700,
									"new_money": 0,
									"djq": 2000,
									"is_coupon": 0
								},
								{
									"discount": 0,
									"money": 1750,
									"new_money": 0,
									"djq": 5000,
									"is_coupon": 0
								},
								{
									"discount": 0,
									"money": 3500,
									"new_money": 0,
									"djq": 10000,
									"is_coupon": 0
								}
							]
						}
					}
					this.list = res.data.list;
					this.discount = obj.discount;
					this.further_reductions = res.data.further_reductions;
					this.line_through = res.data.line_through;

					this.getCanUseCoupon();
				},
				// 最近充值的游戏
				async recentRechargedFn() {
					console.log('最近充值的游戏');
					let res = {
						"code": 10000,
						"msg": "成功",
						"data": {
							"id": 1479,
							"pic1": "http://oss.sssgo.com/data/upload/game/20240906/66da863c4deb8.png",
							"gamename": "猫狩纪",
							"cps_djq_ladderpay": null,
							"gamelevel": 0,
							"djq_ladderpay": "[{&quot;key&quot;:&quot;100&quot;,&quot;value&quot;:&quot;0.1&quot;},{&quot;key&quot;:&quot;500&quot;,&quot;value&quot;:&quot;0.2&quot;},{&quot;key&quot;:&quot;1000&quot;,&quot;value&quot;:&quot;0.22&quot;}]",
							"firstpay": "2.5",
							"otherpay": "3.0",
							"pay_firstpay": 0.1,
							"pay_otherpay": 0.1,
							"is_reassure_play": 0,
							"is_hasten": 1,
							"subtitle": "0.1",
							"discount": 0.3,
							"super_discount": 0.1,
							"super_discount_show": 1,
							"pay_coin": 0.1,
							"showmz": false
						}
					}
					console.log(res);
					if (res.code == 10000) {
						let game = res.data;
						if (game.id) {
							this.zr = game
							this.showFlag = true
							let idx = this.saveid ? this.saveid : game.id;
							this.getGameDetail(idx);//查询游戏详情
						}
					}
				},
				//
				init() {
					console.log('重新进入')
					if (this.userinfo) {
						let gid = this.gid
						// 获取游戏
						if (gid) {
							this.saveid = gid;
							this.getGameDetail(gid);//查询游戏详情
						} else {
							this.recentRechargedFn();//获取最近充值的游戏
						}
					}
					this.num = null;
					this.flbNumIpt = null;
				},
				/*选择游戏0*/
				//滚动
				handleScroll(event, type) {
					console.log(type, '-------type')
					const scrollDiv = event.target;
					const scrollTop = scrollDiv.scrollTop;// 获取滚动条的当前位置
					const clientHeight = scrollDiv.clientHeight;// 获取滚动容器的可视高度
					const scrollHeight = scrollDiv.scrollHeight;// 获取滚动内容的总高度
					// 判断是否滚动到底部
					if (scrollTop + clientHeight >= scrollHeight - 40) {
						console.log('已经滚动到底部');
						// 你可以在这里执行加载更多数据的操作
						if (type == 1) {
							this.getGameList();
						}
						if (type == 2) {
							this.getCouponList();
						}
					}
				},
				//获取游戏
				getGameList(type) {
					if (type == 'new') {
						this.selectStatus = 'more';
						this.selectPage = 1;
						this.gList = [];
					}
					//判断状态
					if (this.selectStatus != 'more') {
						return false;
					}
					this.selectStatus = 'loading';
					let params = {
						game_name: '',
						page: this.selectPage,
						size: 10,
					};
					let res = {
						"code": 10000,
						"msg": "成功",
						"data": {
							"list": [
								{
									"id": 2105,
									"pic1": "http://oss.sssgo.com/data/upload/game/20240918/66ea7812b4227.png",
									"gamename": "自由之刃",
									"gametype": 4,
									"gametype1": 13,
									"gametype2": 22,
									"edition": 0,
									"apkname": "com.yw661.zyzr22",
									"firstpay": "2.5",
									"otherpay": "3.0",
									"djq_ladderpay": "[{&quot;key&quot;:&quot;100&quot;,&quot;value&quot;:&quot;0.1&quot;},{&quot;key&quot;:&quot;500&quot;,&quot;value&quot;:&quot;0.2&quot;},{&quot;key&quot;:&quot;1000&quot;,&quot;value&quot;:&quot;0.21&quot;},{&quot;key&quot;:&quot;2000&quot;,&quot;value&quot;:&quot;0.22&quot;},{&quot;key&quot;:&quot;5000&quot;,&quot;value&quot;:&quot;0.22&quot;},{&quot;key&quot;:&quot;10000&quot;,&quot;value&quot;:&quot;0.22&quot;}]",
									"cps_djq_ladderpay": null,
									"gamelevel": 0,
									"pay_firstpay": 10,
									"pay_otherpay": 10,
									"is_reassure_play": 0,
									"is_hasten": 0,
									"subtitle": "",
									"super_discount": 0,
									"super_discount_show": 0,
									"is_firstpay": 0,
									"discount": 0.3,
									"pay_coin": 10,
									"showmz": false
								},
								{
									"id": 2920,
									"pic1": "http://oss.sssgo.com/data/upload/game/20250108/677e3a8ec8de8.png",
									"gamename": "武魂觉醒-众神版",
									"gametype": 4,
									"gametype1": 8,
									"gametype2": 22,
									"edition": 0,
									"apkname": "com.dldlwhjxzsb.ahzy",
									"firstpay": "3.5",
									"otherpay": "3.5",
									"djq_ladderpay": "[{\"key\":\"100\",\"value\":\"0.1\"},{\"key\":\"500\",\"value\":\"0.18\"},{\"key\":\"1000\",\"value\":\"0.2\"}]",
									"cps_djq_ladderpay": null,
									"gamelevel": 1,
									"pay_firstpay": 10,
									"pay_otherpay": 10,
									"is_reassure_play": 0,
									"is_hasten": 0,
									"subtitle": "",
									"super_discount": 0.1,
									"super_discount_show": 1,
									"is_firstpay": 1,
									"discount": 0.35,
									"pay_coin": 10,
									"showmz": false
								},
								{
									"id": 2711,
									"pic1": "http://oss.sssgo.com/data/upload/game/20241220/67656bf4a3899.JPG",
									"gamename": "怒火一刀-三职业【9.30关服】",
									"gametype": 13,
									"gametype1": 22,
									"gametype2": 4,
									"edition": 0,
									"apkname": "com.yw661.nhyd",
									"firstpay": "2.5",
									"otherpay": "3.0",
									"djq_ladderpay": "[{&quot;key&quot;:&quot;100&quot;,&quot;value&quot;:&quot;0.1&quot;},{&quot;key&quot;:&quot;500&quot;,&quot;value&quot;:&quot;0.2&quot;},{&quot;key&quot;:&quot;1000&quot;,&quot;value&quot;:&quot;0.21&quot;},{&quot;key&quot;:&quot;2000&quot;,&quot;value&quot;:&quot;0.22&quot;},{&quot;key&quot;:&quot;5000&quot;,&quot;value&quot;:&quot;0.22&quot;},{&quot;key&quot;:&quot;10000&quot;,&quot;value&quot;:&quot;0.22&quot;}]",
									"cps_djq_ladderpay": null,
									"gamelevel": 0,
									"pay_firstpay": 10,
									"pay_otherpay": 10,
									"is_reassure_play": 0,
									"is_hasten": 0,
									"subtitle": "",
									"super_discount": 0.1,
									"super_discount_show": 1,
									"is_firstpay": 1,
									"discount": 0.25,
									"pay_coin": 10,
									"showmz": false
								},
								{
									"id": 2822,
									"pic1": "http://oss.sssgo.com/data/upload/game/20241230/67726f2edd4fe.png",
									"gamename": "侠行天下",
									"gametype": 18,
									"gametype1": 4,
									"gametype2": 1,
									"edition": 2,
									"apkname": "com.wan1735870719.game",
									"firstpay": "3.0",
									"otherpay": "3.5",
									"djq_ladderpay": "[{&quot;key&quot;:&quot;100&quot;,&quot;value&quot;:&quot;0.15&quot;}]",
									"cps_djq_ladderpay": null,
									"gamelevel": 0,
									"pay_firstpay": 0.1,
									"pay_otherpay": 0.1,
									"is_reassure_play": 0,
									"is_hasten": 0,
									"subtitle": "0.1折【5.18关服】",
									"super_discount": 0.15,
									"super_discount_show": 1.5,
									"is_firstpay": 1,
									"discount": 0.3,
									"pay_coin": 0.1,
									"showmz": false
								},
								{
									"id": 2490,
									"pic1": "http://oss.sssgo.com/data/upload/game/20241113/673459c71b64e.png",
									"gamename": "天命传说",
									"gametype": 13,
									"gametype1": 4,
									"gametype2": 22,
									"edition": 0,
									"apkname": "com.tmcs.m661",
									"firstpay": "2.5",
									"otherpay": "2.8",
									"djq_ladderpay": "[{&quot;key&quot;:&quot;100&quot;,&quot;value&quot;:&quot;0.1&quot;},{&quot;key&quot;:&quot;500&quot;,&quot;value&quot;:&quot;0.2&quot;},{&quot;key&quot;:&quot;1000&quot;,&quot;value&quot;:&quot;0.21&quot;},{&quot;key&quot;:&quot;2000&quot;,&quot;value&quot;:&quot;0.22&quot;},{&quot;key&quot;:&quot;5000&quot;,&quot;value&quot;:&quot;0.22&quot;},{&quot;key&quot;:&quot;10000&quot;,&quot;value&quot;:&quot;0.22&quot;}]",
									"cps_djq_ladderpay": null,
									"gamelevel": 0,
									"pay_firstpay": 10,
									"pay_otherpay": 10,
									"is_reassure_play": 0,
									"is_hasten": 0,
									"subtitle": "老兵传奇【9.16关服】",
									"super_discount": 0.1,
									"super_discount_show": 1,
									"is_firstpay": 1,
									"discount": 0.25,
									"pay_coin": 10,
									"showmz": false
								},
								{
									"id": 2408,
									"pic1": "http://oss.sssgo.com/data/upload/game/20241101/67249fd49a2bc.jpg",
									"gamename": "无名之辈",
									"gametype": 10,
									"gametype1": 18,
									"gametype2": 8,
									"edition": 2,
									"apkname": "com.wan1734413801.game",
									"firstpay": "3.0",
									"otherpay": "3.5",
									"djq_ladderpay": "[{\"key\":\"100\",\"value\":\"0.1\"},{\"key\":\"500\",\"value\":\"0.23\"},{\"key\":\"1000\",\"value\":\"0.27\"}]",
									"cps_djq_ladderpay": null,
									"gamelevel": 0,
									"pay_firstpay": 10,
									"pay_otherpay": 10,
									"is_reassure_play": 0,
									"is_hasten": 1,
									"subtitle": "",
									"super_discount": 0.1,
									"super_discount_show": 1,
									"is_firstpay": 1,
									"discount": 0.3,
									"pay_coin": 10,
									"showmz": false
								},
								{
									"id": 2393,
									"pic1": "http://oss.sssgo.com/data/upload/game/20241030/672228e641648.png",
									"gamename": "热血习武",
									"gametype": 13,
									"gametype1": 4,
									"gametype2": 22,
									"edition": 0,
									"apkname": "com.yxcs.sixsixone",
									"firstpay": "2.5",
									"otherpay": "3.0",
									"djq_ladderpay": "[{&quot;key&quot;:&quot;100&quot;,&quot;value&quot;:&quot;0.1&quot;},{&quot;key&quot;:&quot;500&quot;,&quot;value&quot;:&quot;0.2&quot;},{&quot;key&quot;:&quot;1000&quot;,&quot;value&quot;:&quot;0.21&quot;},{&quot;key&quot;:&quot;2000&quot;,&quot;value&quot;:&quot;0.22&quot;},{&quot;key&quot;:&quot;5000&quot;,&quot;value&quot;:&quot;0.22&quot;},{&quot;key&quot;:&quot;10000&quot;,&quot;value&quot;:&quot;0.22&quot;}]",
									"cps_djq_ladderpay": null,
									"gamelevel": 0,
									"pay_firstpay": 10,
									"pay_otherpay": 10,
									"is_reassure_play": 0,
									"is_hasten": 0,
									"subtitle": "云霄传世【10.20关服】",
									"super_discount": 0.1,
									"super_discount_show": 1,
									"is_firstpay": 1,
									"discount": 0.25,
									"pay_coin": 10,
									"showmz": false
								},
								{
									"id": 2314,
									"pic1": "http://oss.sssgo.com/data/upload/game/20241022/671683afc394a.png",
									"gamename": "龙城",
									"gametype": 22,
									"gametype1": 13,
									"gametype2": 4,
									"edition": 0,
									"apkname": "com.yw661.gswz",
									"firstpay": "2.5",
									"otherpay": "3.0",
									"djq_ladderpay": "[{\"key\":\"100\",\"value\":\"0.1\"},{\"key\":\"500\",\"value\":\"0.2\"},{\"key\":\"1000\",\"value\":\"0.21\"},{\"key\":\"2000\",\"value\":\"0.22\"},{\"key\":\"5000\",\"value\":\"0.22\"},{\"key\":\"10000\",\"value\":\"0.22\"}]",
									"cps_djq_ladderpay": null,
									"gamelevel": 0,
									"pay_firstpay": 10,
									"pay_otherpay": 10,
									"is_reassure_play": 0,
									"is_hasten": 0,
									"subtitle": "盖世王者",
									"super_discount": 0.1,
									"super_discount_show": 1,
									"is_firstpay": 1,
									"discount": 0.25,
									"pay_coin": 10,
									"showmz": false
								},
								{
									"id": 2220,
									"pic1": "http://oss.sssgo.com/data/upload/game/20240927/66f696dec9116.png",
									"gamename": "永恒纪元",
									"gametype": 12,
									"gametype1": 6,
									"gametype2": 4,
									"edition": 0,
									"apkname": "com.yhjysbjsb.ahzy",
									"firstpay": "2.5",
									"otherpay": "3.0",
									"djq_ladderpay": "[{\"key\":\"100\",\"value\":\"0.1\"},{\"key\":\"500\",\"value\":\"0.19\"},{\"key\":\"1000\",\"value\":\"0.23\"}]",
									"cps_djq_ladderpay": null,
									"gamelevel": 0,
									"pay_firstpay": 10,
									"pay_otherpay": 10,
									"is_reassure_play": 0,
									"is_hasten": 0,
									"subtitle": "三倍加速版",
									"super_discount": 0.1,
									"super_discount_show": 1,
									"is_firstpay": 1,
									"discount": 0.25,
									"pay_coin": 10,
									"showmz": false
								},
								{
									"id": 1855,
									"pic1": "http://oss.sssgo.com/data/upload/game/20240809/66b59ac516e3b.png",
									"gamename": "苍穹灭",
									"gametype": 4,
									"gametype1": 13,
									"gametype2": 22,
									"edition": 0,
									"apkname": "com.yw661.cqm",
									"firstpay": "2.5",
									"otherpay": "3.0",
									"djq_ladderpay": "[{&quot;key&quot;:&quot;100&quot;,&quot;value&quot;:&quot;0.1&quot;},{&quot;key&quot;:&quot;500&quot;,&quot;value&quot;:&quot;0.2&quot;},{&quot;key&quot;:&quot;1000&quot;,&quot;value&quot;:&quot;0.21&quot;},{&quot;key&quot;:&quot;2000&quot;,&quot;value&quot;:&quot;0.22&quot;},{&quot;key&quot;:&quot;5000&quot;,&quot;value&quot;:&quot;0.22&quot;},{&quot;key&quot;:&quot;10000&quot;,&quot;value&quot;:&quot;0.22&quot;}]",
									"cps_djq_ladderpay": null,
									"gamelevel": 0,
									"pay_firstpay": 10,
									"pay_otherpay": 10,
									"is_reassure_play": 0,
									"is_hasten": 0,
									"subtitle": "",
									"super_discount": 0.1,
									"super_discount_show": 1,
									"is_firstpay": 1,
									"discount": 0.25,
									"pay_coin": 10,
									"showmz": false
								}
							]
						}
					}
					if (res.code == 10000) {
						let list = res.data.list || [];
						if (list.length == 0 && page == 1) {
							toast.success('暂无可选择游戏')
						} else {
							this.gList = [...this.gList, ...list];
							this.selectPage++;
							this.selectStatus = pageState(this.gList.length, list.length)
						}
					} else {
						toast.success(res.msg);
					}
				},
				//选择游戏 - 输入内容
				debouncedHandleInput() {
					this.selectPage = 1;
					this.gList = [];
					this.getGameList('new')
				},
				//点击选择游戏
				selectOkGame(item) {
					console.log(item)
					this.gid = item.id;
					this.zr = item;
					this.saveid = item.id;
					this.flbNum = '';
					this.flbNumIpt = null;
					this.num = '';
					this.resetCoupon();//重置优惠券
					this.flagTap = 8;
					this.showFlag = true;
					this.getCzList(item);//获取充值金额列表
					hideAnimation('.gasme-pselect,.pop');
				},
				/*选择游戏1*/
				/*选择优惠券1*/
				//点击显示优惠券列表
				openQuan() {
					console.log(this.flagnum, '----flagnum')
					this.getCouponList('new');
					showAnimation('.gcoupon-pselect,.pop');


					if (this.flagnum == 0) return;
					if (this.zr.id != '') {
						this.getCouponList('new');
						showAnimation('.gcoupon-pselect,.pop');
					} else {
						toast.success("请选择游戏")
						return
					}
				},
				//获取游戏
				getCouponList(type) {
					console.log(type)
					if (type == 'new') {
						this.couponStatus = 'more';
						this.couponPage = 1;
						this.couponList = [];
					}
					//判断状态
					if (this.couponStatus != 'more') {
						return false;
					}
					this.couponStatus = 'loading';
					let params = {
						game_name: '',
						page: this.couponPage,
						size: 10,
					};
					let res = {
						"code": 10000,
						"msg": "成功",
						"data": {
							"list": [
								{
									"id": 2105,
									"pic1": "http://oss.sssgo.com/data/upload/game/20240918/66ea7812b4227.png",
									"gamename": "自由之刃",
									"gametype": 4,
									"gametype1": 13,
									"gametype2": 22,
									"edition": 0,
									"apkname": "com.yw661.zyzr22",
									"firstpay": "2.5",
									"otherpay": "3.0",
									"djq_ladderpay": "[{&quot;key&quot;:&quot;100&quot;,&quot;value&quot;:&quot;0.1&quot;},{&quot;key&quot;:&quot;500&quot;,&quot;value&quot;:&quot;0.2&quot;},{&quot;key&quot;:&quot;1000&quot;,&quot;value&quot;:&quot;0.21&quot;},{&quot;key&quot;:&quot;2000&quot;,&quot;value&quot;:&quot;0.22&quot;},{&quot;key&quot;:&quot;5000&quot;,&quot;value&quot;:&quot;0.22&quot;},{&quot;key&quot;:&quot;10000&quot;,&quot;value&quot;:&quot;0.22&quot;}]",
									"cps_djq_ladderpay": null,
									"gamelevel": 0,
									"pay_firstpay": 10,
									"pay_otherpay": 10,
									"is_reassure_play": 0,
									"is_hasten": 0,
									"subtitle": "",
									"super_discount": 0,
									"super_discount_show": 0,
									"is_firstpay": 0,
									"discount": 0.3,
									"pay_coin": 10,
									"showmz": false
								},
								{
									"id": 2920,
									"pic1": "http://oss.sssgo.com/data/upload/game/20250108/677e3a8ec8de8.png",
									"gamename": "武魂觉醒-众神版",
									"gametype": 4,
									"gametype1": 8,
									"gametype2": 22,
									"edition": 0,
									"apkname": "com.dldlwhjxzsb.ahzy",
									"firstpay": "3.5",
									"otherpay": "3.5",
									"djq_ladderpay": "[{\"key\":\"100\",\"value\":\"0.1\"},{\"key\":\"500\",\"value\":\"0.18\"},{\"key\":\"1000\",\"value\":\"0.2\"}]",
									"cps_djq_ladderpay": null,
									"gamelevel": 1,
									"pay_firstpay": 10,
									"pay_otherpay": 10,
									"is_reassure_play": 0,
									"is_hasten": 0,
									"subtitle": "",
									"super_discount": 0.1,
									"super_discount_show": 1,
									"is_firstpay": 1,
									"discount": 0.35,
									"pay_coin": 10,
									"showmz": false
								},
								{
									"id": 2711,
									"pic1": "http://oss.sssgo.com/data/upload/game/20241220/67656bf4a3899.JPG",
									"gamename": "怒火一刀-三职业【9.30关服】",
									"gametype": 13,
									"gametype1": 22,
									"gametype2": 4,
									"edition": 0,
									"apkname": "com.yw661.nhyd",
									"firstpay": "2.5",
									"otherpay": "3.0",
									"djq_ladderpay": "[{&quot;key&quot;:&quot;100&quot;,&quot;value&quot;:&quot;0.1&quot;},{&quot;key&quot;:&quot;500&quot;,&quot;value&quot;:&quot;0.2&quot;},{&quot;key&quot;:&quot;1000&quot;,&quot;value&quot;:&quot;0.21&quot;},{&quot;key&quot;:&quot;2000&quot;,&quot;value&quot;:&quot;0.22&quot;},{&quot;key&quot;:&quot;5000&quot;,&quot;value&quot;:&quot;0.22&quot;},{&quot;key&quot;:&quot;10000&quot;,&quot;value&quot;:&quot;0.22&quot;}]",
									"cps_djq_ladderpay": null,
									"gamelevel": 0,
									"pay_firstpay": 10,
									"pay_otherpay": 10,
									"is_reassure_play": 0,
									"is_hasten": 0,
									"subtitle": "",
									"super_discount": 0.1,
									"super_discount_show": 1,
									"is_firstpay": 1,
									"discount": 0.25,
									"pay_coin": 10,
									"showmz": false
								},
								{
									"id": 2822,
									"pic1": "http://oss.sssgo.com/data/upload/game/20241230/67726f2edd4fe.png",
									"gamename": "侠行天下",
									"gametype": 18,
									"gametype1": 4,
									"gametype2": 1,
									"edition": 2,
									"apkname": "com.wan1735870719.game",
									"firstpay": "3.0",
									"otherpay": "3.5",
									"djq_ladderpay": "[{&quot;key&quot;:&quot;100&quot;,&quot;value&quot;:&quot;0.15&quot;}]",
									"cps_djq_ladderpay": null,
									"gamelevel": 0,
									"pay_firstpay": 0.1,
									"pay_otherpay": 0.1,
									"is_reassure_play": 0,
									"is_hasten": 0,
									"subtitle": "0.1折【5.18关服】",
									"super_discount": 0.15,
									"super_discount_show": 1.5,
									"is_firstpay": 1,
									"discount": 0.3,
									"pay_coin": 0.1,
									"showmz": false
								},
								{
									"id": 2490,
									"pic1": "http://oss.sssgo.com/data/upload/game/20241113/673459c71b64e.png",
									"gamename": "天命传说",
									"gametype": 13,
									"gametype1": 4,
									"gametype2": 22,
									"edition": 0,
									"apkname": "com.tmcs.m661",
									"firstpay": "2.5",
									"otherpay": "2.8",
									"djq_ladderpay": "[{&quot;key&quot;:&quot;100&quot;,&quot;value&quot;:&quot;0.1&quot;},{&quot;key&quot;:&quot;500&quot;,&quot;value&quot;:&quot;0.2&quot;},{&quot;key&quot;:&quot;1000&quot;,&quot;value&quot;:&quot;0.21&quot;},{&quot;key&quot;:&quot;2000&quot;,&quot;value&quot;:&quot;0.22&quot;},{&quot;key&quot;:&quot;5000&quot;,&quot;value&quot;:&quot;0.22&quot;},{&quot;key&quot;:&quot;10000&quot;,&quot;value&quot;:&quot;0.22&quot;}]",
									"cps_djq_ladderpay": null,
									"gamelevel": 0,
									"pay_firstpay": 10,
									"pay_otherpay": 10,
									"is_reassure_play": 0,
									"is_hasten": 0,
									"subtitle": "老兵传奇【9.16关服】",
									"super_discount": 0.1,
									"super_discount_show": 1,
									"is_firstpay": 1,
									"discount": 0.25,
									"pay_coin": 10,
									"showmz": false
								},
								{
									"id": 2408,
									"pic1": "http://oss.sssgo.com/data/upload/game/20241101/67249fd49a2bc.jpg",
									"gamename": "无名之辈",
									"gametype": 10,
									"gametype1": 18,
									"gametype2": 8,
									"edition": 2,
									"apkname": "com.wan1734413801.game",
									"firstpay": "3.0",
									"otherpay": "3.5",
									"djq_ladderpay": "[{\"key\":\"100\",\"value\":\"0.1\"},{\"key\":\"500\",\"value\":\"0.23\"},{\"key\":\"1000\",\"value\":\"0.27\"}]",
									"cps_djq_ladderpay": null,
									"gamelevel": 0,
									"pay_firstpay": 10,
									"pay_otherpay": 10,
									"is_reassure_play": 0,
									"is_hasten": 1,
									"subtitle": "",
									"super_discount": 0.1,
									"super_discount_show": 1,
									"is_firstpay": 1,
									"discount": 0.3,
									"pay_coin": 10,
									"showmz": false
								},
								{
									"id": 2393,
									"pic1": "http://oss.sssgo.com/data/upload/game/20241030/672228e641648.png",
									"gamename": "热血习武",
									"gametype": 13,
									"gametype1": 4,
									"gametype2": 22,
									"edition": 0,
									"apkname": "com.yxcs.sixsixone",
									"firstpay": "2.5",
									"otherpay": "3.0",
									"djq_ladderpay": "[{&quot;key&quot;:&quot;100&quot;,&quot;value&quot;:&quot;0.1&quot;},{&quot;key&quot;:&quot;500&quot;,&quot;value&quot;:&quot;0.2&quot;},{&quot;key&quot;:&quot;1000&quot;,&quot;value&quot;:&quot;0.21&quot;},{&quot;key&quot;:&quot;2000&quot;,&quot;value&quot;:&quot;0.22&quot;},{&quot;key&quot;:&quot;5000&quot;,&quot;value&quot;:&quot;0.22&quot;},{&quot;key&quot;:&quot;10000&quot;,&quot;value&quot;:&quot;0.22&quot;}]",
									"cps_djq_ladderpay": null,
									"gamelevel": 0,
									"pay_firstpay": 10,
									"pay_otherpay": 10,
									"is_reassure_play": 0,
									"is_hasten": 0,
									"subtitle": "云霄传世【10.20关服】",
									"super_discount": 0.1,
									"super_discount_show": 1,
									"is_firstpay": 1,
									"discount": 0.25,
									"pay_coin": 10,
									"showmz": false
								},
								{
									"id": 2314,
									"pic1": "http://oss.sssgo.com/data/upload/game/20241022/671683afc394a.png",
									"gamename": "龙城",
									"gametype": 22,
									"gametype1": 13,
									"gametype2": 4,
									"edition": 0,
									"apkname": "com.yw661.gswz",
									"firstpay": "2.5",
									"otherpay": "3.0",
									"djq_ladderpay": "[{\"key\":\"100\",\"value\":\"0.1\"},{\"key\":\"500\",\"value\":\"0.2\"},{\"key\":\"1000\",\"value\":\"0.21\"},{\"key\":\"2000\",\"value\":\"0.22\"},{\"key\":\"5000\",\"value\":\"0.22\"},{\"key\":\"10000\",\"value\":\"0.22\"}]",
									"cps_djq_ladderpay": null,
									"gamelevel": 0,
									"pay_firstpay": 10,
									"pay_otherpay": 10,
									"is_reassure_play": 0,
									"is_hasten": 0,
									"subtitle": "盖世王者",
									"super_discount": 0.1,
									"super_discount_show": 1,
									"is_firstpay": 1,
									"discount": 0.25,
									"pay_coin": 10,
									"showmz": false
								},
								{
									"id": 2220,
									"pic1": "http://oss.sssgo.com/data/upload/game/20240927/66f696dec9116.png",
									"gamename": "永恒纪元",
									"gametype": 12,
									"gametype1": 6,
									"gametype2": 4,
									"edition": 0,
									"apkname": "com.yhjysbjsb.ahzy",
									"firstpay": "2.5",
									"otherpay": "3.0",
									"djq_ladderpay": "[{\"key\":\"100\",\"value\":\"0.1\"},{\"key\":\"500\",\"value\":\"0.19\"},{\"key\":\"1000\",\"value\":\"0.23\"}]",
									"cps_djq_ladderpay": null,
									"gamelevel": 0,
									"pay_firstpay": 10,
									"pay_otherpay": 10,
									"is_reassure_play": 0,
									"is_hasten": 0,
									"subtitle": "三倍加速版",
									"super_discount": 0.1,
									"super_discount_show": 1,
									"is_firstpay": 1,
									"discount": 0.25,
									"pay_coin": 10,
									"showmz": false
								},
								{
									"id": 1855,
									"pic1": "http://oss.sssgo.com/data/upload/game/20240809/66b59ac516e3b.png",
									"gamename": "苍穹灭",
									"gametype": 4,
									"gametype1": 13,
									"gametype2": 22,
									"edition": 0,
									"apkname": "com.yw661.cqm",
									"firstpay": "2.5",
									"otherpay": "3.0",
									"djq_ladderpay": "[{&quot;key&quot;:&quot;100&quot;,&quot;value&quot;:&quot;0.1&quot;},{&quot;key&quot;:&quot;500&quot;,&quot;value&quot;:&quot;0.2&quot;},{&quot;key&quot;:&quot;1000&quot;,&quot;value&quot;:&quot;0.21&quot;},{&quot;key&quot;:&quot;2000&quot;,&quot;value&quot;:&quot;0.22&quot;},{&quot;key&quot;:&quot;5000&quot;,&quot;value&quot;:&quot;0.22&quot;},{&quot;key&quot;:&quot;10000&quot;,&quot;value&quot;:&quot;0.22&quot;}]",
									"cps_djq_ladderpay": null,
									"gamelevel": 0,
									"pay_firstpay": 10,
									"pay_otherpay": 10,
									"is_reassure_play": 0,
									"is_hasten": 0,
									"subtitle": "",
									"super_discount": 0.1,
									"super_discount_show": 1,
									"is_firstpay": 1,
									"discount": 0.25,
									"pay_coin": 10,
									"showmz": false
								}
							]
						}
					}
					if (res.code == 10000) {
						let list = res.data.list || [];
						if (list.length == 0 && page == 1) {
							toast.success('暂无可选择游戏')
						} else {
							this.couponList = [...this.couponList, ...list];
							this.couponPage++;
							this.couponStatus = pageState(this.couponList.length, list.length)
						}
					} else {
						toast.success(res.msg);
					}
				},
				//选择优惠券
				couponCelect(item) {
					let use_time = item.use_time;
					let time = new Date().getTime();
					//已使用 锁定中  10分钟后解锁 10分钟后的时候小于当前时间 就是还没到解锁时间
					if (use_time && (use_time + 60 * 10) > time / 1000) {
						toast.success('该优惠券锁定中，请' + Math.ceil(((use_time + 60 * 10) - time / 1000) / 60) + '分钟后再使用',)
						return;
					}
					this.couponObj = item;
					this.actualPay();
					hideAnimation('.gcoupon-pselect,.pop');
				},
				/*选择优惠券1*/
			},
		})
	</script>

</body>

</html>